package com.carpedil.utils;

import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;

import java.nio.charset.Charset;

/** @author Administrator */
public class StringUtil {
  public static final long CACHE_TIME = 60L;
  public static final long CACHE_NULL = 5L;
  public static long THREAD_SLEEP_TIME = 400;
  public static long LOCK_WAIT_TIME = 100;
  public static long LOCK_TIME = 10;
  public static BloomFilter bloomFilter = null;

  static {
    bloomFilter =
        BloomFilter.create(Funnels.stringFunnel(Charset.defaultCharset()), 1000000, 0.001);
    bloomFilter.put("zy_city");
  }

  public static boolean isNull(String str) {
    boolean b = false;
    if (null != str && !"".equals(str)) {
      b = true;
    }
    return b;
  }
}
